What is Virtual Environment?
Normally, what happens when we install Python Libraries it is installed at global level. Now, when we want to install specific packages for our Project we need to install at local level.
Virtual Environment is an excluding environment provided by Python to work on a particular Project. If you need to install libraries at your project level virtual environment helps a lot.
Setup of Virtual Environment and Django in your System
◼️ First install Python in your System.
◼️ Open CMD.
◼️ Open your Directory in CMD where you want to setup your Project.
$ mkdir project_name
◼️ Change Directory in CMD
$ cd..
$ directory_name: [Example- D: ]
$ mkdir project_name
◼️ Install Virtual Environment using CMD
$ pip install virtualenv
◼️ Activate Virtual Environment. Remember: You should be in your Working Directory.
$ virtualenv env
$ env\Scripts\activate
◼️ Install Django in Virtual Environment.
$ pip install Django